<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Symbol内置属性</title>
</head>
<body>
    <script>
        // function Symbol() {

        // }
        // Symbol.a = 100;
        // Symbol.b = 100;

        let obj = {
            //魔术方法(函数)  自动执行场景   扩展对象的功能(被动技能)
            [Symbol.match]: function(){
                console.log('运行啦!!');
            }
        }

        let str = 'iloveyou';

        str.match(obj)


        
    </script>
</body>
</html>